package cate.game.play.buff.h;


import cate.game.attr.FightAttr;
import cate.game.play.buff.BuffHandler;
import cate.game.play.proce.action.ctx.ActionCtx;
import easy.java.dev.note.NoteClass;

@NoteClass("属性变更")
public class 属性变更BH extends BuffHandler {

    private FightAttr attr;

    @Override
    public void parse(String code) {
        this.attr = new FightAttr(code);
    }


    public FightAttr getAttr() {
        return attr;
    }

    @Override
    public void onAdd(ActionCtx action) {
        this.buff.owner.attr.addAttr(this.attr, true, action);
    }

    @Override
    public void onInvalid(ActionCtx action, byte invalidReason) {
        this.buff.owner.attr.addAttr(this.attr, false, action);
    }
}
